<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>在线考试</title>
<style>
  .key {
	font-weight: bold; color: #c30
}
</style>
</head>

<body>
<div class="description" id="limit_time">
<script language="javascript">
  var limit_seconds = 9000;
  function deal_limit_time(){
   if(limit_seconds > 0)
	{
	  var hours = Math.floor(limit_seconds/3600);
	  var minutes = Math.floor(limit_seconds/60)%60;
	  var seconds = Math.floor(limit_seconds%60);
	  if(hours<10){hours = "0" + hours;}
	  else 
	    if(hours>99){hours = "99";}
		else{hours = hours + "";}
	  if(minutes<10){minutes = "0" + minutes;}
	  else{minutes = minutes + "";}
	  if(seconds<10){seconds = "0" + seconds;}
	  else{seconds = seconds + ""}  
	  var msgTime = "离考试结束时间还剩：<span class=\"key\">"
	  +hours.substr(0,2)+"</span>小时<span class=\"key\">"
	  +minutes.substr(0,2)+"</span>分<span class=\"key\">"
	  +seconds.substr(0,2)+"</span>秒";
	  document.getElementById("limit_time").innerHTML = msgTime;
	  --limit_seconds;
	 }
  }
  timer = setInterval("deal_limit_time()",1000);
</script>
</div>
</body>
</html>
